<form id="pagerForm" action="__URL__" method="post">   <!-- action="#rel#" -->
    <input type="hidden" name="p" value="1" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$param.orderDirection}" />
</form>


<div class="pageHeader">
    <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__URL__" method="post">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    礼品名称:
                    <input type="text" style="height: 20px;" value="{$filters.giftname  }" name="giftname  " />
                </td>
                <td>
                    时间范围：
                    <input type="text"  name="convert_time"  value="{$filters.convert_time}" class="date" readonly="true"/>
                    &nbsp;&nbsp;至&nbsp;&nbsp;
                    <input type="text"  name="convert_times" value="{$filters.convert_times}" class="date" readonly="true"/>
                </td>
            </tr>
        </table>
        <div class="subBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
            </ul>
        </div>
    </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <if condition="in_array('insert', $privilegelist)">
                <li><a class="add" href="__URL__/add" rel="adminadd" max="true" target="dialog"><span>添加</span></a></li>
                <li class="line">line</li>
            </if>
            <if condition="in_array('delete', $privilegelist)">
                <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="__URL__/delAll" postType="string" class="delete"><span>批量删除</span></a></li>
                <li class="line">line</li>
            </if>
        </ul>
    </div>
    
    <table class="table" width="100%" layoutH="138">
        <thead>
            <tr>
            <if condition="in_array('delete', $privilegelist)">
                <th>
                    <input type="checkbox" group="ids" class="checkboxCtrl" />
                </th>
            </if>
            <th>礼品名称</th>
            <th>用户姓名</th>
            <th>兑换数量</th>
            <th>兑换日期</th>
            <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
            <tr rel="{$vo.gifts_id}" target="gifts_id">
                <if condition="in_array('delete', $privilegelist)">
                    <td>
                        <input name="ids" value="{$vo.gifts_id}" type="checkbox"/>
                    </td>
                </if>
                <td>
                    <a target="dialog" href="__APP__/Gifts/gifts_info/id/{$vo.gifts_id}" title="礼品详情" height="560" width="590" rel="orderupdate">{$vo.gift.giftname}
                    </a>
                </td>
                <td>{$vo.user.username}</td>
                <td>{$vo.convert_count}</td>
                <td>{$vo.convert_time|date="Y-m-d H:i:s",###}</td>
                <td>
                    <if condition="in_array('delete', $privilegelist)">
                        <a title="是否要删除当前商品?" target="ajaxTodo" href="__URL__/delete/id/{$vo.gifts_id}"class="btnDel">删除</a>
                    </if>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20" <?php echo $numPerPage == 20 ? 'selected="true"' : '' ; ?> >20</option>
                <option value="50" <?php echo $numPerPage == 50 ? 'selected="true"' : '' ; ?>>50</option>
                <option value="100" <?php echo $numPerPage == 100 ? 'selected="true"' : '' ; ?> >100</option>
                <option value="200" <?php echo $numPerPage == 200 ? 'selected="true"' : '' ; ?> >200</option>
            </select>
            <span>条，共{$totalCount}条</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>

    </div>
</div>
